#!/usr/bin/env python3
import pymysql
from warnings import filterwarnings

filterwarnings('ignore', category=pymysql.Warning)
try:
    db = pymysql.connect(host='localhost', user='root', passwd='123456')
    cur = db.cursor()
    cur.execute('create database if not exists python')
    cur.execute("""create table if not exists python.net(
    time int unsigned primary key,
    sent int unsigned,
    recv int unsigned
    )""")
    db.close()
except Exception as e:
    print(e)
